<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="cmcc.operator.*" %>

<%@include file="../checkLoginSession.jsp" %>
<% 
	String flag = request.getParameter("flag");
	System.out.println("delOperator.jsp---------------flag = "+flag);
	if(flag==null||!flag.equals("delete")){
		return ;
	}
	
	String [] ids = request.getParameterValues("ids");
	System.out.println("ids1 = "+ids);
	//System.out.println("ids.length = "+ids.length);
	if(ids==null){	
		%>
			<<script type="text/javascript">
			<!--
				history.back();
			//-->
			</script>
		<%
		return;
	}
	for(int i = 0;i<ids.length;i++){
		System.out.println("ids["+i+"] = "+ids[i]);
		if(Operator.delOperator(ids[i])){
			System.out.println("yes is delete");
			continue;		
		}else{
			%>
				<br><br><br>
				<h2 align="center">删除操作出错，请稍后再试！</h2>
				<br><br><br><br>
				<h3 align="center"> 
					<a href="operatorList.jsp">返回</a>
				</h3>
				
			<%
			return;
		}
	}
	
	%>
		<br><br><br>
		<h2 align="center">删除成功！</h2>
		<br><br><br><br>
		<h3 align="center"> 
			<a href="operatorList.jsp">返回</a>
		</h3>		
	<%
%>
